; Type: ANIMATED_TILE
ANIMATED_TILE_NONE           EQU $00
ANIMATED_TILE_COUNTER        EQU $01
ANIMATED_TILE_TIDE           EQU $02
ANIMATED_TILE_VILLAGE        EQU $03
ANIMATED_TILE_DUNGEON_1      EQU $04
ANIMATED_TILE_UNDERGROUND    EQU $05
ANIMATED_TILE_LAVA           EQU $06
ANIMATED_TILE_DUNGEON_2      EQU $07
ANIMATED_TILE_WARP_TILE      EQU $08
ANIMATED_TILE_CURRENTS       EQU $09
ANIMATED_TILE_WATERFALL      EQU $0A
ANIMATED_TILE_WATERFALL_SLOW EQU $0B
ANIMATED_TILE_WATER_DUNGEON  EQU $0C
ANIMATED_TILE_LIGHT_BEAM     EQU $0D
ANIMATED_TILE_CRYSTAL_BLOCK  EQU $0E
ANIMATED_TILE_BUBBLES        EQU $0F
ANIMATED_TILE_WEATHER_VANE   EQU $10
ANIMATED_TILE_PHOTO          EQU $11

; Type: BUTTON
J_RIGHT  EQU %00000001
J_LEFT   EQU %00000010
J_UP     EQU %00000100
J_DOWN   EQU %00001000
J_A      EQU %00010000
J_B      EQU %00100000
J_SELECT EQU %01000000
J_START  EQU %10000000

; Type: DIRECTION
DIRECTION_RIGHT EQU $00
DIRECTION_LEFT  EQU $01
DIRECTION_UP    EQU $02
DIRECTION_DOWN  EQU $03
DIRECTION_KEEP  EQU $0F

; Type: GAMEMODE
GAMEMODE_INTRO             EQU $00
GAMEMODE_CREDITS           EQU $01
GAMEMODE_FILE_SELECT       EQU $02
GAMEMODE_FILE_NEW          EQU $03
GAMEMODE_FILE_DELETE       EQU $04
GAMEMODE_FILE_COPY         EQU $05
GAMEMODE_FILE_SAVE         EQU $06
GAMEMODE_WORLD_MAP         EQU $07
GAMEMODE_PEACH_PIC         EQU $08
GAMEMODE_MARIN_BEACH       EQU $09
GAMEMODE_WF_MURAL          EQU $0A
GAMEMODE_WORLD             EQU $0B
GAMEMODE_INVENTORY         EQU $0C
GAMEMODE_PHOTO_ALBUM       EQU $0D
GAMEMODE_PHOTO_DIZZY_LINK  EQU $0E
GAMEMODE_PHOTO_NICE_LINK   EQU $0F
GAMEMODE_PHOTO_MARIN_CLIFF EQU $10
GAMEMODE_PHOTO_MARIN_WELL  EQU $11
GAMEMODE_PHOTO_MABE        EQU $12
GAMEMODE_PHOTO_ULRIRA      EQU $13
GAMEMODE_PHOTO_BOW_WOW     EQU $14
GAMEMODE_PHOTO_THIEF       EQU $15
GAMEMODE_PHOTO_FISHERMAN   EQU $16
GAMEMODE_PHOTO_ZORA        EQU $17
GAMEMODE_PHOTO_KANALET     EQU $18
GAMEMODE_PHOTO_GHOST       EQU $19
GAMEMODE_PHOTO_BRIDGE      EQU $1A

; Type: HW_CARTRIDGETYPE
cartridge_mbc1_ram_battery EQU $03

; Type: HW_COLORGAMEBOY
not_color_gameboy EQU $00
is_color_gameboy  EQU $80

; Type: HW_DESTINATIONCODE
destination_japanese    EQU $00
destination_nonjapanese EQU $01

; Type: HW_IE
IE_VBLANK            EQU %00000001
IE_LCDC              EQU %00000010
IE_TIMEROVERFLOW     EQU %00000100
IE_SERIALIO          EQU %00001000
IE_PIN1013TRANSITION EQU %00010000

; Type: HW_RAMSIZE
ramsize_none    EQU $00
ramsize_1bank   EQU $01
ramsize_1bank_  EQU $02
ramsize_4banks  EQU $03
ramsize_16banks EQU $04

; Type: HW_ROMSIZE
romsize_2banks   EQU $00
romsize_4banks   EQU $01
romsize_8banks   EQU $02
romsize_16banks  EQU $03
romsize_32banks  EQU $04
romsize_64banks  EQU $05
romsize_128banks EQU $06
romsize_72banks  EQU $52
romsize_80banks  EQU $53
romsize_96banks  EQU $54

; Type: HW_SUPERGAMEBOY
not_super_gameboy EQU $00
is_super_gameboy  EQU $80

; Type: INTERACTIVE_MOTION
INTERACTIVE_MOTION_ENABLED           EQU $00
INTERACTIVE_MOTION_LOCKED_GRAB_SLASH EQU $01
INTERACTIVE_MOTION_LOCKED_TALKING    EQU $02

; Type: J
J_RIGHT  EQU %00000001
J_LEFT   EQU %00000010
J_UP     EQU %00000100
J_DOWN   EQU %00001000
J_A      EQU %00010000
J_B      EQU %00100000
J_SELECT EQU %01000000
J_START  EQU %10000000

; Type: JOYPAD
JOYPAD_DIRECTIONS EQU %00010000
JOYPAD_BUTTONS    EQU %00100000

; Type: LCDCF
LCDCF_OFF          EQU %00000000
LCDCF_BG_DISPLAY   EQU %00000001
LCDCF_OBJ_DISPLAY  EQU %00000010
LCDCF_OBJ_16_16    EQU %00000100
LCDCF_BG_TILE_9C00 EQU %00001000
LCDCF_BG_CHAR_8000 EQU %00010000
LCDCF_WINDOW_ON    EQU %00100000
LCDCF_TILEMAP_9C00 EQU %01000000
LCDCF_ON           EQU %10000000

; Type: LINK_ANIMATION
LINK_ANIMATION_STATE_STANDING_DOWN                   EQU $00
LINK_ANIMATION_STATE_WALKING_DOWN                    EQU $01
LINK_ANIMATION_STATE_UNKNOWN_02                      EQU $02
LINK_ANIMATION_STATE_UNKNOWN_03                      EQU $03
LINK_ANIMATION_STATE_STANDING_UP                     EQU $04
LINK_ANIMATION_STATE_WALKING_UP                      EQU $05
LINK_ANIMATION_STATE_STANDING_LEFT                   EQU $06
LINK_ANIMATION_STATE_WALKING_LEFT                    EQU $07
LINK_ANIMATION_STATE_UNKNOWN_08                      EQU $08
LINK_ANIMATION_STATE_UNKNOWN_09                      EQU $09
LINK_ANIMATION_STATE_STANDING_RIGHT                  EQU $0A
LINK_ANIMATION_STATE_WALKING_RIGHT                   EQU $0B
LINK_ANIMATION_STATE_HOOKSHOT_CHAIN_DOWN             EQU $0E
LINK_ANIMATION_STATE_HOOKSHOT_CHAIN_UP               EQU $0F
LINK_ANIMATION_STATE_HOOKSHOT_CHAIN_LEFT             EQU $10
LINK_ANIMATION_STATE_HOOKSHOT_CHAIN_RIGHT            EQU $11
LINK_ANIMATION_STATE_UNKNOWN_12                      EQU $12
LINK_ANIMATION_STATE_UNKNOWN_13                      EQU $13
LINK_ANIMATION_STATE_UNKNOWN_14                      EQU $14
LINK_ANIMATION_STATE_UNKNOWN_15                      EQU $15
LINK_ANIMATION_STATE_UNKNOWN_16                      EQU $16
LINK_ANIMATION_STATE_UNKNOWN_17                      EQU $17
LINK_ANIMATION_STATE_UNKNOWN_18                      EQU $18
LINK_ANIMATION_STATE_UNKNOWN_19                      EQU $19
LINK_ANIMATION_STATE_STANDING_PUSHING_DOWN           EQU $1A
LINK_ANIMATION_STATE_WALKING_PUSHING_DOWN            EQU $1B
LINK_ANIMATION_STATE_STANDING_PUSHING_UP             EQU $1C
LINK_ANIMATION_STATE_WALKING_PUSHING_UP              EQU $1D
LINK_ANIMATION_STATE_STANDING_PUSHING_LEFT           EQU $1E
LINK_ANIMATION_STATE_WALKING_PUSHING_LEFT            EQU $1F
LINK_ANIMATION_STATE_STANDING_PUSHING_RIGHT          EQU $20
LINK_ANIMATION_STATE_WALKING_PUSHING_RIGHT           EQU $21
LINK_ANIMATION_STATE_STANDING_SHIELD_DOWN            EQU $22
LINK_ANIMATION_STATE_WALKING_SHIELD_DOWN             EQU $23
LINK_ANIMATION_STATE_STANDING_SHIELD_USE_DOWN        EQU $24
LINK_ANIMATION_STATE_WALKING_SHIELD_USE_DOWN         EQU $25
LINK_ANIMATION_STATE_STANDING_MIRROR_SHIELD_USE_DOWN EQU $26
LINK_ANIMATION_STATE_WALKING_MIRROR_SHIELD_USE_DOWN  EQU $27
LINK_ANIMATION_STATE_STANDING_SHIELD_USE_LEFT        EQU $28
LINK_ANIMATION_STATE_WALKING_SHIELD_USE_LEFT         EQU $29
LINK_ANIMATION_STATE_STANDING_SHIELD_USE_RIGHT       EQU $2A
LINK_ANIMATION_STATE_WALKING_SHIELD_USE_RIGHT        EQU $2B
LINK_ANIMATION_STATE_STANDING_SHIELD_RIGHT           EQU $2C
LINK_ANIMATION_STATE_WALKING_SHIELD_RIGHT            EQU $2D
LINK_ANIMATION_STATE_STANDING_MIRROR_SHIELD_RIGHT    EQU $2E
LINK_ANIMATION_STATE_WALKING_MIRROR_SHIELD_RIGHT     EQU $2F
LINK_ANIMATION_STATE_STANDING_SHIELD_USE_UP          EQU $30
LINK_ANIMATION_STATE_WALKING_SHIELD_USE_UP           EQU $31
LINK_ANIMATION_STATE_STANDING_MIRROR_SHIELD_USE_UP   EQU $32
LINK_ANIMATION_STATE_WALKING_MIRROR_SHIELD_USE_UP    EQU $33
LINK_ANIMATION_STATE_STANDING_SHIELD_UP              EQU $34
LINK_ANIMATION_STATE_WALKING_SHIELD_UP               EQU $35
LINK_ANIMATION_STATE_UNKNOWN_36                      EQU $36
LINK_ANIMATION_STATE_UNKNOWN_38                      EQU $38
LINK_ANIMATION_STATE_UNKNOWN_3A                      EQU $3A
LINK_ANIMATION_STATE_UNKNOWN_3C                      EQU $3C
LINK_ANIMATION_STATE_STANDING_LIFTING_RIGHT          EQU $3E
LINK_ANIMATION_STATE_WALKING_LIFTING_RIGHT           EQU $3F
LINK_ANIMATION_STATE_STANDING_LIFTING_LEFT           EQU $40
LINK_ANIMATION_STATE_WALKING_LIFTING_LEFT            EQU $41
LINK_ANIMATION_STATE_STANDING_LIFTING_UP             EQU $42
LINK_ANIMATION_STATE_WALKING_LIFTING_UP              EQU $43
LINK_ANIMATION_STATE_STANDING_LIFTING_DOWN           EQU $44
LINK_ANIMATION_STATE_WALKING_LIFTING_DOWN            EQU $45
LINK_ANIMATION_STATE_HOLD_SWIMMING_1_RIGHT           EQU $46
LINK_ANIMATION_STATE_MOVING_SWIMMING_1_RIGHT         EQU $47
LINK_ANIMATION_STATE_HOLD_SWIMMING_1_LEFT            EQU $48
LINK_ANIMATION_STATE_MOVING_SWIMMING_1_LEFT          EQU $49
LINK_ANIMATION_STATE_HOLD_SWIMMING_1_UP              EQU $4A
LINK_ANIMATION_STATE_MOVING_SWIMMING_1_UP            EQU $4B
LINK_ANIMATION_STATE_HOLD_SWIMMING_1_DOWN            EQU $4C
LINK_ANIMATION_STATE_MOVING_SWIMMING_1_DOWN          EQU $4D
LINK_ANIMATION_STATE_HOLD_SWIMMING_2                 EQU $4E
LINK_ANIMATION_STATE_MOVING_SWIMMING_2               EQU $4F
LINK_ANIMATION_STATE_UNKNOWN_50                      EQU $50
LINK_ANIMATION_STATE_UNKNOWN_51                      EQU $51
LINK_ANIMATION_STATE_UNKNOWN_52                      EQU $52
LINK_ANIMATION_STATE_UNKNOWN_53                      EQU $53
LINK_ANIMATION_STATE_UNKNOWN_54                      EQU $54
LINK_ANIMATION_STATE_UNKNOWN_55                      EQU $55
LINK_ANIMATION_STATE_UNKNOWN_56                      EQU $56
LINK_ANIMATION_STATE_UNKNOWN_57                      EQU $57
LINK_ANIMATION_STATE_STANDING_SIDE_SCROLL_LEFT_DOWN  EQU $58
LINK_ANIMATION_STATE_WALKING_SIDE_SCROLL_LEFT_DOWN   EQU $59
LINK_ANIMATION_STATE_STANDING_SIDE_SCROLL_RIGHT_UP   EQU $5B
LINK_ANIMATION_STATE_WALKING_SIDE_SCROLL_RIGHT_UP    EQU $5C
LINK_ANIMATION_STATE_JUMPING_1                       EQU $5E
LINK_ANIMATION_STATE_JUMPING_2                       EQU $5F
LINK_ANIMATION_STATE_JUMPING_3                       EQU $60
LINK_ANIMATION_STATE_UNKNOWN_61                      EQU $61
LINK_ANIMATION_STATE_UNKNOWN_62                      EQU $62
LINK_ANIMATION_STATE_UNKNOWN_63                      EQU $63
LINK_ANIMATION_STATE_UNKNOWN_64                      EQU $64
LINK_ANIMATION_STATE_UNKNOWN_65                      EQU $65
LINK_ANIMATION_STATE_UNKNOWN_66                      EQU $66
LINK_ANIMATION_STATE_UNKNOWN_67                      EQU $67
LINK_ANIMATION_STATE_UNKNOWN_68                      EQU $68
LINK_ANIMATION_STATE_UNKNOWN_69                      EQU $69
LINK_ANIMATION_STATE_UNKNOWN_6A                      EQU $6A
LINK_ANIMATION_STATE_UNKNOWN_6B                      EQU $6B
LINK_ANIMATION_STATE_GOT_ITEM                        EQU $6C
LINK_ANIMATION_STATE_UNKNOWN_75                      EQU $75
LINK_ANIMATION_STATE_NO_UPDATE                       EQU $FF

; Type: MUSIC
MUSIC_NONE                             EQU $00
MUSIC_TITLE_SCREEN_INTRO               EQU $01
MUSIC_MINIGAME                         EQU $02
MUSIC_GAME_OVER                        EQU $03
MUSIC_MABE_VILLAGE                     EQU $04
MUSIC_OVERWORLD                        EQU $05
MUSIC_MT_TAMARANCH                     EQU $06
MUSIC_WITCH_HUT                        EQU $07
MUSIC_RAFT_RIDE_RAPIDS                 EQU $08
MUSIC_MYSTERIOUS_FOREST                EQU $09
MUSIC_HOUSE                            EQU $0A
MUSIC_ANIMAL_VILLAGE                   EQU $0B
MUSIC_FAIRY_FOUNTAIN                   EQU $0C
MUSIC_TITLE_SCREEN                     EQU $0D
MUSIC_BOWWOW_KIDNAPPED                 EQU $0E
MUSIC_SWORD_ACQUIRED                   EQU $0F
MUSIC_TOOL_ACQUIRED                    EQU $10
MUSIC_FILE_SELECT                      EQU $11
MUSIC_EGG_MAZE                         EQU $12
MUSIC_KANALET_CASTLE                   EQU $13
MUSIC_TAIL_CAVE                        EQU $14
MUSIC_BOTTLE_GROTTO                    EQU $15
MUSIC_KEY_CAVERN                       EQU $16
MUSIC_ANGLERS_TUNNEL                   EQU $17
MUSIC_BOSS_DEFEATED                    EQU $18
MUSIC_BOSS_BATTLE                      EQU $19
MUSIC_INTRO_CUTSCENE                   EQU $1A
MUSIC_INSTRUMENT_ACQUIRED              EQU $1B
MUSIC_LINK_AWAKENS                     EQU $1C
MUSIC_SWORD_SEARCH                     EQU $1D
MUSIC_DREAMING                         EQU $1E
MUSIC_SOUTHERN_SHRINE                  EQU $1F
MUSIC_INSTRUMENT_FULL_MOON_CELLO       EQU $20
MUSIC_2D_UNDERGROUND                   EQU $21
MUSIC_OWL                              EQU $22
MUSIC_FINAL_BOSS                       EQU $23
MUSIC_DREAM_SHRINE_BED                 EQU $24
MUSIC_HEART_CONTAINER_ACQUIRED         EQU $25
MUSIC_COMMON_CAVE                      EQU $26
MUSIC_POWERUP_ACQUIRED                 EQU $27
MUSIC_INSTRUMENT_CONCH_HORN            EQU $28
MUSIC_INSTRUMENT_SEA_LILY_BELL         EQU $29
MUSIC_INSTRUMENT_SURF_HARP             EQU $2A
MUSIC_INSTRUMENT_WIND_MARIMBA          EQU $2B
MUSIC_INSTRUMENT_CORAL_TRIANGLE        EQU $2C
MUSIC_INSTRUMENT_ORGAN_OF_EVENING_CALM EQU $2D
MUSIC_INSTRUMENT_THUNDER_DRUM          EQU $2E
MUSIC_MARIN_SINGING                    EQU $2F
MUSIC_MANBO_MAMBO                      EQU $30
MUSIC_OVERWORLD_INTRO                  EQU $31
MUSIC_MR_WRITE_HOUSE                   EQU $32
MUSIC_PHONE_BOOTH                      EQU $33
MUSIC_TARIN_BEEHIVE                    EQU $34
MUSIC_MAMU_SONG                        EQU $35
MUSIC_MONKEYS_BUILDING_BRIDGE          EQU $36
MUSIC_CHRISTINE_HOUSE                  EQU $37
MUSIC_TOTAKA_SONG_UNUSED               EQU $38
MUSIC_TURTLE_ROCK_ENTRANCE_BOSS        EQU $39
MUSIC_FISHING_UNDER_BRIDGE             EQU $3A
MUSIC_CLASSIC_RECEIVED_ITEM            EQU $3B
MUSIC_TOTAKEKE_NICKNAME_EASTER_EGG     EQU $3C
MUSIC_ENDING                           EQU $3D
MUSIC_BOWWOW_KIDNAPPED_INTRODUCTION    EQU $3E
MUSIC_WIND_FISH_AWAKENS                EQU $3F
MUSIC_RICHARD_MANSION                  EQU $40
MUSIC_BALLAD_HORN                      EQU $41
MUSIC_BALLAD_BELL                      EQU $42
MUSIC_BALLAD_HARP                      EQU $43
MUSIC_BALLAD_MARIMBA                   EQU $44
MUSIC_BALLAD_TRIANGLE                  EQU $45
MUSIC_BALLAD_ORGAN                     EQU $46
MUSIC_BALLAD_ALL                       EQU $47
MUSIC_GHOST_HOUSE                      EQU $48
MUSIC_ACTIVE_POWER_UP                  EQU $49
MUSIC_LINK_MARIN_DUET                  EQU $4A
MUSIC_CATFISH_MAW                      EQU $4B
MUSIC_WATERFALL_DRAIN                  EQU $4C
MUSIC_MARIN_BEACH_TRANSITION           EQU $4D
MUSIC_MARIN_BEACH                      EQU $4E
MUSIC_MINIBOSS                         EQU $50
MUSIC_KANALET_CASTLE_COPY              EQU $51
MUSIC_TAIL_CAVE_COPY                   EQU $52
MUSIC_DREAM_SHRINE                     EQU $53
MUSIC_EAGLES_TOWER_BOSS_CUTSCENE       EQU $54
MUSIC_ROOSTER_REVIVAL                  EQU $55
MUSIC_SEASHELL_MANSION_SPIRIT          EQU $56
MUSIC_CUCCO_HOUSE                      EQU $57
MUSIC_FACE_SHRINE                      EQU $58
MUSIC_MEETING_WINDFISH                 EQU $59
MUSIC_TURTLE_ROCK                      EQU $5A
MUSIC_EAGLE_TOWER                      EQU $5B
MUSIC_GRIM_CREEPER_DIALOG              EQU $5C
MUSIC_FINAL_BOSS_DIALOG                EQU $5D
MUSIC_BOSS_WARNING                     EQU $5E
MUSIC_FINAL_BOSS_DEFEATED              EQU $5F
MUSIC_ZELDA_NICKNAME_EASTER_EGG        EQU $60
MUSIC_COLOR_DUNGEON                    EQU $61
MUSIC_SILENCE                          EQU $FF

; Type: STATF
STATF_HB     EQU %00000000
STATF_VB     EQU %00000001
STATF_OAM    EQU %00000010
STATF_LYCF   EQU %00000100
STATF_MODE00 EQU %00001000
STATF_MODE01 EQU %00010000
STATF_MODE10 EQU %00100000
STATF_LYC    EQU %01000000

; Type: UPDATE_BG_TILES
UPDATE_BG_TILES_DO_NOTHING      EQU $00
UPDATE_BG_TILES_WORLD           EQU $01
UPDATE_BG_TILES_DUNGEON_MINIMAP EQU $02

; Type: bool
false EQU 0
true  EQU 1

